<!DOCTYPE html>
<html>

<head>
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/example.css?v=1.0" />
    <link rel="stylesheet" type="text/css" href="css/weui.min.css?v=1.0" />
    <link rel="stylesheet" type="text/css" href="css/element-ui.css" />
    <link rel="stylesheet" type="text/css" href="css/public.css?v=5.0" />
    <link rel="stylesheet" type="text/css" href="css/listLook.css?v=7.0.1" />
    <link rel="stylesheet" type="text/css" href="css/addPlace.css" />
    <link rel="stylesheet" type="text/css" href="css/seekList.css?v=1.0.2" />
    <link rel="stylesheet" type="text/css" href="css/careRecords.css" />
    <title>关爱记录</title>

</head>

<body>
    <div id="main" style="padding: 10px;" v-cloak>
        <div class="ub-care_title">
            <span>
                <span v-cloak>{{userInfo.realname}}</span>
                <img src="./images/down-JT.png" class="ub-upORdown" :class="{active:isShow}"
                    @click="isShow = !isShow"></img>
            </span>
            <span class="ub-time">#0000-00-00 00:00</span>
        </div>
        <!-- 人员信息 -->
        <div class="ub-care_age" v-show="!isShow" style="margin-bottom: 12px;">
            <div v-cloak v-if="userInfo.year">
                年龄
                <p>{{userInfo.year}}</p>
            </div>
            <div v-cloak v-if="userInfo.id_card">
                身份证号
                <p>{{userInfo.id_card}}</p>
            </div>
            <div v-cloak v-if="userInfo.category">
                类别
                <p>{{userInfo.category}}</p>
            </div>
            <div v-cloak v-if="userInfo.parent &&  userInfo.parent.name">
                社区
                <p>{{userInfo.parent.name}}</p>
            </div>
            <div v-show="isShowAll">
                <div v-cloak v-if="userInfo.sick_type">
                    具体分类
                    <p>{{userInfo.sick_type}}</p>
                </div>
                <div v-cloak v-if="userInfo.phone">
                    本人或子女联系人电话
                    <p>{{userInfo.phone}}</p>
                </div>
                <div v-cloak v-if="userInfo.birthplace">
                    户籍地址
                    <p>{{userInfo.birthplace}}</p>
                </div>
                <div v-cloak v-if="userInfo.address">
                    居住地址
                    <p>{{userInfo.address}}</p>
                </div>
                <div v-for="(item,index) in userInfo.sick_man_contacts">
                    <div v-cloak v-if="item.realname">
                        紧急联系人{{index + 1}}姓名
                        <p>{{item.realname}}</p>
                    </div>
                    <div v-cloak v-if="item.relationship">
                        紧急联系人{{index + 1}}与老人关系
                        <p>{{item.relationship}}</p>
                    </div>
                    <div v-cloak v-if="item.phone">
                        紧急联系人{{index + 1}}电话
                        <p>{{item.phone}}</p>
                    </div>
                </div>
                <div v-cloak v-if="userInfo.caring_measures">
                    关爱措施
                    <p>{{userInfo.caring_measures}}</p>
                </div>
                <div v-cloak v-if="userInfo.remark">
                    备注
                    <p>{{userInfo.remark}}</p>
                </div>
            </div>
            <div style="display:flex;justify-content: flex-end;color: #409EFF;" v-if="userInfo.sick_type || userInfo.phone || userInfo.birthplace|| userInfo.address||
                (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].realname)||
                (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].relationship)||
                (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].phone)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].realname)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].relationship)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].phone)||
                    (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].realname)||
                    (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].relationship)||
                    (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].phone)||
                userInfo.caring_measures || 
                userInfo.remark
               ">
                <span @click="isShowAll = !isShowAll">{{isShowAll?'收起':'更多信息'}}</span>
            </div>
        </div>

        <div v-for="(year,yearIndex) in list" :key="yearIndex">
            <div class="ub-spl_year">
                <div class="ub-spl_year_left">
                    <img src="images/listIcon15.png" alt="">
                    <span>{{year.year}}年</span>
                </div>
                <div class="ub-spl_year_right" @click="year.flage = !year.flage">{{year.flage?'收起':'查看'}}</div>
            </div>
            <div class="ub-spl_week" v-for="(week,weekIndex) in year.data" :key="weekIndex" v-show="year.flage">
                <div class="ub-spl_week_title">
                    <div class="ub-spl_week_title_left">
                        第{{week.week}}周({{week.start}}至{{week.end}})
                        <span style="color:#E6A23C;display: none;" v-show="week.care.length==0">未走访</span>
                        <span style="color:#206DFF;display: none;" v-show="week.care.length!=0">已走访</span>
                    </div>
                    <div class="ub-spl_year_right" @click="week.flage = !week.flage">{{week.flage?'收起':'查看'}}</div>
                </div>
                <div v-for="(el,i) in week.care" :key="i" v-show="week.flage">
                    <div style="font-size:14px ;font-weight: 900;" class="ub-spl_care_times_title">
                        <span>第（{{i+1}}）次</span>
                        <img src="./images/down-JT.png" class="ub-upORdown" :class="{active:!el.flage}"
                            @click="el.flage = !el.flage"></img>
                    </div>
                    <div v-show="el.flage">
                        <div v-cloak class="ub-form">
                            <div class="ub-careRecords_title">关爱情况记录</div>
                            <div class="ub-careRecords_con">
                                <div class="ub-careRecords_times">
                                    {{el.content}}
                                </div>
                                <div class="ub-careRecords_times ub-careRecords_notimes" v-if="!el.content">暂无</div>
                            </div>
                        </div>
                        <div v-cloak class="ub-form">
                            <div class="ub-careRecords_title">关爱时间</div>
                            <div class="ub-careRecords_con">
                                <div class="ub-careRecords_times" v-if="el.time">
                                    {{el.time}}
                                </div>
                                <div class="ub-careRecords_times ub-careRecords_notimes" v-if="!el.time">
                                    暂无
                                </div>
                            </div>
                        </div>
                        <div v-cloak class="ub-uploadImg">
                            <div class="ub-uploadImg-title">
                                <p>照片</p>
                            </div>
                            <div class="ub-careRecords_con" style="margin-top: 6px;" v-if="el.img.length==0">
                                <div class="ub-careRecords_times ub-careRecords_notimes">暂无</div>
                            </div>
                            <div class="ub-upImage" v-else>
                                <div style="position: relative;" v-for="(img,imgIndex) in el.img" :key="imgIndex">
                                    <img @click="lookImg(el.img,img)"
                                        style="width: 90px;height: 90px;object-fit: cover;" :src="img">
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- 完成按钮 -->
        <div v-cloak class="ub-button">
            <el-button @click="goBack" type="primary">返 回</el-button>
        </div>
    </div>
    <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jweixin-1.6.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/element-ui.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jwt-decode.min.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="js/cHttp.js?v=1.0.0" type="text/javascript" charset="utf-8"></script>
    <script src="js/wxPublic.js?v=15.0.0" type="text/javascript" charset="utf-8"></script>
    <script src="js/t-gConversion.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/g-tConversion.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/tdApi.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/careRecords.js?v=1.0.12" type="text/javascript" charset="utf-8"></script>

</body>


</html>